package com.laizhenghua.order.service;

import com.laizhenghua.commons.entity.CommonResult;
import com.laizhenghua.commons.entity.PaymentEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @description:
 * @date: 2022/2/11 21:25
 */
@Component(value = "paymentFeignService")
@FeignClient(name = "PAYMENT-SERVER")
@RequestMapping(path = "/payment")
public interface PaymentFeignService {
    @RequestMapping(path = "/getPaymentById/{id}", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
    public CommonResult<PaymentEntity> getPaymentEntityById(@PathVariable(value = "id") Integer id);

    @RequestMapping(path = "/timeoutTest", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
    public CommonResult<String> timeoutTest();
}
